/* 用户信息区域 */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between; /* 新增 */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.user-info {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;

    order: 2; /* 强制右侧显示 */
    margin-left: auto; /* 新增保险措施 */
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.15);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.username {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

/* 用户菜单 */
.user-menu {
    position: fixed; /* 改为固定定位 */
    top: 60px; /* 根据导航栏实际高度调整 */
    right: 20px; /* 与导航栏右侧对齐 */
    width: 160px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
    z-index: 1000; /* 确保高于导航栏层级 */
}

.user-menu.active {
    display: block;
}

.menu-item {
    padding: 12px;
    color: var(--text-dark);
    transition: background 0.3s;
}

.menu-item:hover {
    background: #f5f5f5;
}

/* 订单抽屉 */
.order-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 12px rgba(0,0,0,0.1);
    transition: right 0.3s;
    z-index: 1001;
    padding: 1.5rem;
}

.order-drawer.active {
    right: 0;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.order-list {
    overflow-y: auto;
    max-height: 80vh;
}

.order-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.order-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.order-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-detail {
    flex: 1;
}

.order-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.order-time {
    color: #666;
    font-size: 0.9rem;
}

/* 复用原有遮罩样式 */
#orderOverlay {
    z-index: 1000; /* 确保在订单抽屉之下 */
}



.reset-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1003;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: var(--primary-hover);
}